package com.behome.netty.netty_A.enums;


import com.behome.netty.common.ByteConventerKit;

public enum ProtocolA50Type {
    PSN_TASK_SYNC_RESP((byte) -3, "任务同步请求响应指令"),//todo 用于太极广播列表同cmd的列表同步处理
    UNKNOWN((byte) 0, "未知"),
    HEARTBEAT((byte) 32, "心跳"),//cmd心跳
    COMMON_RESP((byte) 18, "通用回复指令"),//cmd心跳回复
    QUERY_OUTPUT_CHANNEL_RESP((byte) 0x13, "查询输出通道回复指令"),//查询通过用
    QUERY_INPUT_CHANNEL_RESP((byte) 0x14, "查询输入通道回复指令"),
    QUERY_BCAST_RECORD_RESP((byte) 0x15, "查询播发记录回复指令"),
    QUERY_FAULT_DETAIL_RESP((byte) 0x16, "查询故障详情回复指令"),
    START_STOP_BCAST_RESP((byte) 0x17, "开/停播请求回复"),
    TASK_BEGIN_REPORT((byte) 24, "任务开始上报"),
    TASK_END_REPORT((byte) 25, "任务结束上报"),

    BCAST_MESSAGE((byte) 35, "上报短信广播类容"),//无

    TAIJI_BEGIN_REPORT((byte) 50, "上级开始指令上报"),
    TAIJI_END_REPORT((byte) 51, "上级接收指令上报"),
    ADAPTER_INFO((byte) 38, "县适配器信息上报");

    private byte value;
    private String name;

    public byte getValue() {
        return this.value;
    }

    public String getName() {
        return this.name;
    }

    private ProtocolA50Type(byte value, String name) {
        this.value = value;
        this.name = name;
    }

    public String toString() {
        return "指令名称:" + this.name + ",指令类型:" + ByteConventerKit.byteToHexStr(this.value, true, true);
    }

}
